home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 9,300 to 9,399 / 9300.zip / AOLDLs / HTML & Web Tools (MAC) / HTML_ TagStripper 1.0 / TagStripper v1.0 Ä.sit / TagStripper v1.0 ƒ / Sample Scripts / NetStripper Example Script.text < prev    next >
Text File  |  1996-03-26  |  961b  |  23 lines

  1. -- Sample script using NetStripper.
  2. -- Copyright ⌐ 1995 Adam Lloyd, but feel free to use this for your own purposes.
  3. -- Contact: adam@park78.ftech.co.uk
  4.  
  5. -- First of all, get hold of a text file from the user.
  6. -- We'll use a standard get file box to do this.
  7. global theTextFile -- the file we will be getting will be stored here
  8.  
  9. copy (choose file of type "TEXT") to theTextFile -- ask the user to select a text file
  10.  
  11. -- Now we actually tell NetStripper to convert that particular file into a DOS file.
  12. tell application "NetStripper v2.5.2"
  13.     activate -- we want to see the translation in progress
  14.     Mac To DOS theTextFile -- do the conversion
  15.     quit -- quit from NetStripper (this won't happen automatically)
  16. end tell
  17.  
  18. -- Now we'll show the text file using SimpleText. This will let you see the little boxes
  19. -- that characterise a DOS text file.
  20. tell application "SimpleText"
  21.     open theTextFile
  22.     activate -- activate SimpleText so we can see the text file
  23. end tell